package com.song.user.feign;

import com.song.common.constant.ServiceNameConstants;
import com.song.common.model.Order;
import com.song.common.result.ResultEntity;
import com.song.user.feign.fallback.FailedOrderService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ServiceNameConstants.ORDER_SERVICE, fallback = FailedOrderService.class)
public interface OrderService {
    @GetMapping("/order/get")
    ResultEntity<Order> getByNum(@RequestParam("num") String num);
}
